home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_07
/
greissma
/
mapobj.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-03-09
|
912b
|
25 lines
Listing 4: Declaration for Mapped Object
class MappedObject {
protected:
Map ↦
public:
virtual ~MappedObject() {}
MappedObject( Map &map ) : map( map ) {}
MappedObject( MappedObject &object );
friend ostream &operator << ( ostream &o, MappedObject &object );
friend istream &operator >> ( istream &i, MappedObject &object );
int compare ( MappedObject &object );
void assign ( MappedObject &object );
void print ();
int operator == ( MappedObject &o ) { return compare( o ) == 0; }
int operator != ( MappedObject &o ) { return compare( o ) != 0; }
int operator >= ( MappedObject &o ) { return compare( o ) >= 0; }
int operator > ( MappedObject &o ) { return compare( o ) > 0; }
int operator <= ( MappedObject &o ) { return compare( o ) <= 0; }
int operator < ( MappedObject &o ) { return compare( o ) < 0; }
} ;